<template>
  <section v-loading="loading" class="cms-body">
    <div class="cms-list-header flex-between">
      <div>
        <el-select v-model="params.integralLogType" @change="goQuery()">
          <el-option label="积分类型" value=""></el-option>
          <el-option label="增加" value="1"></el-option>
          <el-option label="减少" value="2"></el-option>
        </el-select>
        <cms-input label="手机号" v-model="params.mobile"></cms-input>
        <cms-input label="电子邮箱" v-model="params.email"></cms-input>
        <el-button @click="goQuery()">查询</el-button>
      </div>
    </div>
    <!-- 表格 -->
    <el-table :data="tableData" stripe style="width: 100%" @selection-change="checkIds">
      <el-table-column type="selection" width="65" align="center"></el-table-column>
      <el-table-column prop="id" label="ID" width="150" align="center"></el-table-column>
      <el-table-column prop="mobile" label="手机号" width="150" align="center"></el-table-column>
      <el-table-column prop="email" label="邮箱" width="150" align="center"></el-table-column>
      <el-table-column prop="title" label="标题" width="180" align="center"></el-table-column>
      <el-table-column prop="integralLogType" label="积分类型" align="center">
        <div slot-scope="scope">
          <span v-if="scope.row.integralLogType==1">增加</span>
          <span v-if="scope.row.integralLogType==2">减少</span>
        </div>
      </el-table-column>
      <el-table-column prop="integralLogValue" label="积分值" align="center"></el-table-column>
      <el-table-column prop="createTime" label="创建日期" align="center"></el-table-column>
    </el-table>
    <!-- 表格底部 -->
    <div class="cms-list-footer">
      <div class="cms-left"></div>
      <!-- 分页组件 -->
      <cms-pagination :total="total" @change="getPages"></cms-pagination>
    </div>
  </section>
</template>

<script>
  import listMixins from '@/mixins/list'

  export default {
    mixins: [listMixins],
    data() {
      return {
        params: {
          pageNo: 1,
          pageSize: 10,
          integralLogType: ''
        }
      };
    },
    methods: {
      goQuery() {
        this.getTableData(this.params);
      }
    },
    created() {
      this.initTableData(this.$api.appUserIntegralLogPageList, this.params);
    }
  };
</script>

<style>

</style>
